#pragma once
#ifndef SYPX_CANVAS
#define SYPX_CANVAS

#include "Types.h"

namespace SypX
{
	///Canvas(or Window on desktops) is an Abstract Base Class which handles Canvas creation and manipulation. 
	///Specific implementations for different platforms will derive from this class.
	class SYPXAPI Canvas
	{
	public:
		///Canvas constructor
		Canvas();
		///Canvas constructor
		Canvas(UInt width, UInt height, UInt color, UInt depth, bool fullscreen);
		///Canvas deconstructor
		virtual ~Canvas();		
		///Set Canvas attributes(new attributes). (Warning : This will cause the window/context to be destroyed and recreated)
		///Derivatives of this class should call Canvas::resetCanvas(...) first before derived-specific implementation.
		virtual void resetCanvas(UInt width, UInt height, UInt color, UInt depth, bool fullscreen);
		///Sets Canvas(Window) size
		///Derivatives Zof this class should call Canvas::resize(...) first before derived-specific implementation.
		virtual void resize(UInt width, UInt height);
		///Virtual Swap Buffers method
		virtual void swapBuffers()=0;		
		///Returns the Canvas width
		UInt getWidth();
		///Returns the Canvas height
		UInt getHeight();
		///Returns an event from the Event que
		virtual Event getEvent() = 0;	
		///Returns whether the Window/Application is still open
		virtual bool isOpen() = 0;
		///Returns the elapsed time(in seconds) since the last swapBuffer call
		virtual float getElapsedTime()=0;
	protected:
		UInt width;
		UInt height;
		UInt color;
		UInt depth;	
		bool fullscreen;
	
	};


}

#endif